package top.skihub.pojo;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

@Data
public class MineInfo {
    private Integer userId;  // 使用驼峰命名，让 MyBatis 自动处理映射
    private String passwd;
    private String userName;
    private String motto;
    private String phone;
    private String email;
    private String address;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    public MineInfo() {}

    public MineInfo(Integer userId, String passwd, String userName, String motto, String phone, String email, String address, Date birthday) {
        this.userId = userId;
        this.passwd = passwd;
        this.userName = userName;
        this.motto = motto;
        this.phone = phone;
        this.email = email;
        this.address = address;
        this.birthday = birthday;
    }

    // Getter and Setter methods
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getMotto() {
        return motto;
    }

    public void setMotto(String motto) {
        this.motto = motto;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
